
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <link href="/Public/CSS/Report/ProfitReportX/table1.css" rel="stylesheet" type="text/css" />

    <link href="/sap/demo.css" rel="stylesheet" type="text/css" />
    <script src="/sap/scripts/boot.js" type="text/javascript"></script>


    <style type="text/css">
        body{
            margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;
        }
    </style>
</head>
<body>
<div class="mini-fit">

    <table border="1"  id="mytable" cellspacing="0" >
        <thead>
        <tr >
            <th  style="width:6%"><div align="center">物料号</div></th>
            <th  style="width:6%"><div align="center">物料名</div></th>
            <th  style="width:6%" ><div align="center">产品经理</div></th>
            <th  style="width:6%" ><div align="center">数量</div></th>
            <th  style="width:6%"><div align="center">金额</div></th>
        </tr>
        </thead>

        <foreach name="data" item="result">

            <tr align="center">
                <td><?php echo $result['itemcode'];?></td>
                <td><?php echo $result['itemname'];?></td>
                <td><?php echo $result['pmanager'];?></td>
                <td><?php echo round($result['SUMQTY'],0);?></td>
                <td><?php echo round($result['SUMPRICE'],2);?></td>
            </tr>

        </foreach>

    </table>

</div>
<div class="mini-toolbar" style="text-align:center;padding-top:8px;padding-bottom:8px;" borderStyle="border:0;">
    <a class="mini-button" style="width:60px;" onclick="onOk()">关 闭</a>
    <!--<span style="display:inline-block;width:25px;"></span>-->
    <!--<a class="mini-button" style="width:60px;" onclick="onCancel()">取消</a>-->
</div>

</body>
</html>
<script type="text/javascript">
    mini.parse();

    var grid = mini.get("datagrid1");
    grid.setPageSize(100);
    //动态设置URL
    //也可以动态设置列 grid.setColumns([]);

    //grid.load();

    function GetData() {
        var row = grid.getSelected();
        return row;
    }
    function search() {
        var key = mini.get("key").getValue();
        grid.load({ c_name: key });
    }
    function onKeyEnter(e) {
        search();
    }
    function onRowDblClick(e) {
        onOk();
    }
    //////////////////////////////////
    function CloseWindow(action) {
        if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
        else window.close();
    }

    function onOk() {
        CloseWindow("ok");
    }
    function onCancel() {
        CloseWindow("cancel");
    }


</script>